﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using SimpleForum.Data.Services;

namespace SimpleForum.Controllers
{
    public class CategoryController : BaseController
    {
        private readonly ICategoryService CategoryService;

        public CategoryController(ICategoryService CategoryService)
        {
            this.CategoryService = CategoryService;
        }

        public ActionResult Index()
        {
            var Category = CategoryService.GetCategories();

            if (Category != null) return View(CategoryService.GetCategories());
            else return EntityNotFound();
        }
    }
}